package w11;

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class TelFormater {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("输入电话号码:");
		String no = in.next();
		
		Pattern p = Pattern.compile("^(1\\d{2})(\\d{4})(\\d{4})$");
		Matcher matcher = p.matcher(no);
		String nn = matcher.replaceAll("$1-$2-$3");
		System.out.println(nn);
	}

}
